package com.example.demo.config;

import com.example.demo.service.UserService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ProviderRegister {
    @Bean
    public ToolCallbackProvider userTools(UserService userService) {
        return MethodToolCallbackProvider.builder().toolObjects(userService).build();
    }
}
